<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	<title>系统通知列表</title>
	<style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
	}
	
	.tabfont01 {
		font-family: "宋体";
		font-size: 9px;
		color: #555555;
		text-decoration: none;
		text-align: center;
	}
	
	.font051 {
		font-family: "宋体";
		font-size: 12px;
		color: #333333;
		text-decoration: none;
		line-height: 20px;
	}
	
	.font201 {
		font-family: "宋体";
		font-size: 12px;
		color: #FF0000;
		text-decoration: none;
	}
	
	.button {
		font-family: "宋体";
		font-size: 14px;
		height: 37px;
	}
	
	html {
		overflow-x: auto;
		overflow-y: auto;
		border: 0;
	}
	-->
	</style>
	
	<link href="css/css.css" rel="stylesheet" type="text/css" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">



//全选
function checkAll(name)
{
  var names=document.getElementsByName(name);
  var len=names.length;
  if(len>0)
  {
   var i=0;
   for(i=0;i<len;i++)
   names[i].checked=true;
    
  }
}

//全不选
function checkAllNo(name)
{
  var names=document.getElementsByName(name);
 var len=names.length;
 if(len>0)
  {
    var i=0;
    for(i=0;i<len;i++)
    names[i].checked=false;
  }
}

//反选
function reserveCheck(name)
{
  var names=document.getElementsByName(name);
 var len=names.length;
 if(len>0)
 {
 var i=0;
   for(i=0;i<len;i++)
   {
     if(names[i].checked)
     names[i].checked=false;
     else
     names[i].checked=true;
   }
 } 

}

//检查是否选中	
function checked(name)
{
  var names=document.getElementsByName(name);
 var len=names.length;
 if(len>0)
 {
 		var i=0;
	   for(i=0;i<len;i++)
	   {
	     if(names[i].checked){
	    	 return 1;
	    	 }
	   }
 	  return 2;
 } 
 return 2;
}

function XXX()	
  { 
  var a = checked("id1");
  	 if(a==1){
     	document.checkIds.submit();    
		}else if(a==2){
		alert("至少选择一项");
     return  false; 
     }
 }
</script>

</script>
</head>
<body>

	<table id="mainpage" width="100%" border="0" cellspacing="0"
		cellpadding="0">
		<tr>
			<td height="30">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr background="images/nav04.gif">
						<td height="62" widht="70">
							<span class="">&nbsp;&nbsp;&nbsp;&nbsp;选择：
								<input type="radio" name="choice" id="ckall" onclick="checkAll('id1','ckall')" />全选
								<input type="radio"  name="choice" id="ckReserve" onclick="reserveCheck('id1','ckReserve')" />反选
								<input name="Submit" type="button" onclick="XXX()" class="right-button02" value="删除" />
										<a href="admin/user/sysMsgAdd.jsp"  target="mainFrame">  <input  type="button" class="right-button08" value="添加系统通知"/></a>
						    </span> 
						</td>
						
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<table id="subtree1" style="DISPLAY: " width="100%"
					border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>
							<table width="95%" border="0" align="center"
								cellpadding="0" cellspacing="0">
								<tr>
									<td height="40" class="font42">
									<form name="fom" id="fom" method="post" action="admin/deleteSyString">
										<table width="100%" border="0" cellpadding="4" align="center"
											cellspacing="1" bgcolor="#464646" class="newfont03">
											<tr>
												<td height="20" colspan="7" align="center" bgcolor="#EEEEEE" class="tablestyle_title" >系统通知列表</td>
											</tr>
											<tr>
												<td width="5%" align="center" bgcolor="#EEEEEE">选择</td>
												<td width="45%" height="20" align="center" bgcolor="#EEEEEE">系统通知标题</td>
												<td width="10%" align="center" bgcolor="#EEEEEE">发送人</td>
												<td width="10%" align="center" bgcolor="#EEEEEE">发送类型</td>
												<td width="20%" align="center" bgcolor="#EEEEEE">发送时间</td>
												<td width="10%" align="center" bgcolor="#EEEEEE">操作</td>
											</tr>
											<c:forEach var="s" items="${requestScope.pages.records}" >
												<tr align="center">
													<td width="5%" align="center" bgcolor="#EEEEEE">
														<input type="checkbox" name="id1" value="${s.smId}"/>
													</td>
													<td width="45%" height="20" align="left" bgcolor="#EEEEEE"><a href="admin/sysMsgDetail?id=${s.smId}">${s.smTitle }</a></td>
													<td width="10%" align="center" bgcolor="#EEEEEE">${s.smSender }</td>
													<td width="10%" align="center" bgcolor="#EEEEEE">系统通知</td>
													<td width="20%" align="center" bgcolor="#EEEEEE">${s.smDate }</td>
													<td width="10%" align="center" bgcolor="#EEEEEE"><a href="admin/sysMsgDetail?id=${s.smId}">查看</a></td>
												</tr>
											</c:forEach>
										</table>
										</form>
										<jsp:include page="../../page.jsp" />
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	
</body>
</html>
